// 从队伍头像处切换登录角色 {"助战编号":2}

// @ts-ignore
export async function execute(client_id,message_json) {
    let index =  message_json["助战编号"];
    let login_characters = G.Characters.get_current_login_characters(client_id);
    let characters = G.TeamUtils.get_team_member(login_characters["队伍"],index-1);
    if(characters === undefined){
        ClientUtils.send_basic_prompt(client_id,"队员不存在");
        return;
    }
    let help_fight_characters = G.HelpFight.get_help_fight_characters_by_id(client_id,characters["id"]);
    if(characters["id"] !== login_characters["id"] && help_fight_characters !== undefined && help_fight_characters["id"] === characters["id"]){
        //重新登陆
        G.Characters.reset_master_login(client_id,characters);
        ClientUtils.send_basic_prompt(client_id,"#G快速切换成功！");
    }
}
